package yangcheng.second;

public class main {
    public static double salCompute(Employee employee) {
        employee.work();
        return employee.salary+employee.addSalary();
    }

    public static void main(String[] args) {
        Employee employee1 = new Worker();
        Employee employee2 = new Manger();
        System.out.println(salCompute(employee1));
        System.out.println(salCompute(employee2));
    }
}
